import type { DishDTO } from "@/views/dish/list/types"
import type { TasteDTO } from "@/views/dish/taste/types"
import type { TableDTO } from "@/views/store/table/types"

    // 查询参数数据
  interface QueryParams {
    pageNum: number
    pageSize: number
    orderId?: string
    tableId?: string
    orderAmount?: number
    receivedAmount?: number
    orderTime?: string
    payTime?: string
    orderStatus?: '待支付' | '已支付'
  }
  
  // 商品列表数据
  interface OrderDTO {
    orderId: string
    table: TableDTO
    peopleCount: number
    dishes: OrderItemDTO[]
    orderAmount: number
    discountAmount?: number
    receivedAmount: number
    orderTime: string
    payTime: string
    orderStatus: '待支付' | '已支付'
    paymentMethod?: '微信' | '支付宝' | '现金' | '团购'
    remarks?: string
  }
  
  interface OrderItemDTO {
    dish: DishDTO
    quantity: number
    note?: string
    selectedTaste?: TasteDTO
  }

  // 商品表单数据
  interface RuleForm {
    orderId: string
    table: TableDTO
    // tableId: string
    peopleCount: number
    dishes: Array<{
      dish: DishDTO
      quantity: number
      note?: string
    }> 
    orderAmount: number
    discountAmount?: number
    receivedAmount: number
    orderTime: string
    payTime: string
    orderStatus: '待支付' | '已支付'
    paymentMethod?: '微信' | '支付宝' | '现金' | '团购'
    remarks?: string
  }
  
  export type { QueryParams, OrderDTO, OrderItemDTO, RuleForm }